Optimal. Leaf size=149 \[ -\frac {a^2 \cosh \left (2 e-\frac {2 c f}{d}\right ) \text {Chi}\left (\frac {2 c f}{d}+2 f x\right )}{2 d}+\frac {3 a^2 \log (c+d x)}{2 d}+\frac {2 i a^2 \text {Chi}\left (\frac {c f}{d}+f x\right ) \sinh \left (e-\frac {c f}{d}\right )}{d}+\frac {2 i a^2 \cosh \left (e-\frac {c f}{d}\right ) \text {Shi}\left (\frac {c f}{d}+f x\right )}{d}-\frac {a^2 \sinh \left (2 e-\frac {2 c f}{d}\right ) \text {Shi}\left (\frac {2 c f}{d}+2 f x\right )}{2 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.26, antiderivative size = 149, normalized size of antiderivative = 1.00, number of steps
used = 9, number of rules used = 5, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.217, Rules used = {3399, 3393,
3384, 3379, 3382} \begin {gather*} \frac {2 i a^2 \text {Chi}\left (x f+\frac {c f}{d}\right ) \sinh \left (e-\frac {c f}{d}\right )}{d}-\frac {a^2 \text {Chi}\left (2 x f+\frac {2 c f}{d}\right ) \cosh \left (2 e-\frac {2 c f}{d}\right )}{2 d}-\frac {a^2 \sinh \left (2 e-\frac {2 c f}{d}\right ) \text {Shi}\left (2 x f+\frac {2 c f}{d}\right )}{2 d}+\frac {2 i a^2 \cosh \left (e-\frac {c f}{d}\right ) \text {Shi}\left (x f+\frac {c f}{d}\right )}{d}+\frac {3 a^2 \log (c+d x)}{2 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 3379
Rule 3382
Rule 3384
Rule 3393
Rule 3399
Rubi steps
\begin {align*} \int \frac {(a+i a \sinh (e+f x))^2}{c+d x} \, dx &=\left (4 a^2\right ) \int \frac {\sin ^4\left (\frac {1}{2} \left (i e+\frac {\pi }{2}\right )+\frac {i f x}{2}\right )}{c+d x} \, dx\\ &=\left (4 a^2\right ) \int \left (\frac {3}{8 (c+d x)}-\frac {\cosh (2 e+2 f x)}{8 (c+d x)}+\frac {i \sinh (e+f x)}{2 (c+d x)}\right ) \, dx\\ &=\frac {3 a^2 \log (c+d x)}{2 d}+\left (2 i a^2\right ) \int \frac {\sinh (e+f x)}{c+d x} \, dx-\frac {1}{2} a^2 \int \frac {\cosh (2 e+2 f x)}{c+d x} \, dx\\ &=\frac {3 a^2 \log (c+d x)}{2 d}-\frac {1}{2} \left (a^2 \cosh \left (2 e-\frac {2 c f}{d}\right )\right ) \int \frac {\cosh \left (\frac {2 c f}{d}+2 f x\right )}{c+d x} \, dx+\left (2 i a^2 \cosh \left (e-\frac {c f}{d}\right )\right ) \int \frac {\sinh \left (\frac {c f}{d}+f x\right )}{c+d x} \, dx-\frac {1}{2} \left (a^2 \sinh \left (2 e-\frac {2 c f}{d}\right )\right ) \int \frac {\sinh \left (\frac {2 c f}{d}+2 f x\right )}{c+d x} \, dx+\left (2 i a^2 \sinh \left (e-\frac {c f}{d}\right )\right ) \int \frac {\cosh \left (\frac {c f}{d}+f x\right )}{c+d x} \, dx\\ &=-\frac {a^2 \cosh \left (2 e-\frac {2 c f}{d}\right ) \text {Chi}\left (\frac {2 c f}{d}+2 f x\right )}{2 d}+\frac {3 a^2 \log (c+d x)}{2 d}+\frac {2 i a^2 \text {Chi}\left (\frac {c f}{d}+f x\right ) \sinh \left (e-\frac {c f}{d}\right )}{d}+\frac {2 i a^2 \cosh \left (e-\frac {c f}{d}\right ) \text {Shi}\left (\frac {c f}{d}+f x\right )}{d}-\frac {a^2 \sinh \left (2 e-\frac {2 c f}{d}\right ) \text {Shi}\left (\frac {2 c f}{d}+2 f x\right )}{2 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.21, size = 117, normalized size = 0.79 \begin {gather*} -\frac {a^2 \left (\cosh \left (2 e-\frac {2 c f}{d}\right ) \text {Chi}\left (\frac {2 f (c+d x)}{d}\right )-3 \log (c+d x)-4 i \text {Chi}\left (f \left (\frac {c}{d}+x\right )\right ) \sinh \left (e-\frac {c f}{d}\right )-4 i \cosh \left (e-\frac {c f}{d}\right ) \text {Shi}\left (f \left (\frac {c}{d}+x\right )\right )+\sinh \left (2 e-\frac {2 c f}{d}\right ) \text {Shi}\left (\frac {2 f (c+d x)}{d}\right )\right )}{2 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 3.45, size = 193, normalized size = 1.30
method | result | size |
risch | \(-\frac {i a^{2} {\mathrm e}^{-\frac {c f -d e}{d}} \expIntegral \left (1, -f x -e -\frac {c f -d e}{d}\right )}{d}+\frac {3 a^{2} \ln \left (d x +c \right )}{2 d}+\frac {a^{2} {\mathrm e}^{-\frac {2 \left (c f -d e \right )}{d}} \expIntegral \left (1, -2 f x -2 e -\frac {2 \left (c f -d e \right )}{d}\right )}{4 d}+\frac {a^{2} {\mathrm e}^{\frac {2 c f -2 d e}{d}} \expIntegral \left (1, 2 f x +2 e +\frac {2 c f -2 d e}{d}\right )}{4 d}+\frac {i a^{2} {\mathrm e}^{\frac {c f -d e}{d}} \expIntegral \left (1, f x +e +\frac {c f -d e}{d}\right )}{d}\) | \(193\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.32, size = 154, normalized size = 1.03 \begin {gather*} \frac {1}{4} \, a^{2} {\left (\frac {e^{\left (\frac {2 \, c f}{d} - 2 \, e\right )} E_{1}\left (\frac {2 \, {\left (d x + c\right )} f}{d}\right )}{d} + \frac {e^{\left (-\frac {2 \, c f}{d} + 2 \, e\right )} E_{1}\left (-\frac {2 \, {\left (d x + c\right )} f}{d}\right )}{d} + \frac {2 \, \log \left (d x + c\right )}{d}\right )} + i \, a^{2} {\left (\frac {e^{\left (\frac {c f}{d} - e\right )} E_{1}\left (\frac {{\left (d x + c\right )} f}{d}\right )}{d} - \frac {e^{\left (-\frac {c f}{d} + e\right )} E_{1}\left (-\frac {{\left (d x + c\right )} f}{d}\right )}{d}\right )} + \frac {a^{2} \log \left (d x + c\right )}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.37, size = 153, normalized size = 1.03 \begin {gather*} -\frac {a^{2} {\rm Ei}\left (-\frac {2 \, {\left (d f x + c f\right )}}{d}\right ) e^{\left (\frac {2 \, {\left (c f - d e\right )}}{d}\right )} + 4 i \, a^{2} {\rm Ei}\left (-\frac {d f x + c f}{d}\right ) e^{\left (\frac {c f - d e}{d}\right )} - 4 i \, a^{2} {\rm Ei}\left (\frac {d f x + c f}{d}\right ) e^{\left (-\frac {c f - d e}{d}\right )} + a^{2} {\rm Ei}\left (\frac {2 \, {\left (d f x + c f\right )}}{d}\right ) e^{\left (-\frac {2 \, {\left (c f - d e\right )}}{d}\right )} - 6 \, a^{2} \log \left (\frac {d x + c}{d}\right )}{4 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} - a^{2} \left (\int \frac {\sinh ^{2}{\left (e + f x \right )}}{c + d x}\, dx + \int \left (- \frac {2 i \sinh {\left (e + f x \right )}}{c + d x}\right )\, dx + \int \left (- \frac {1}{c + d x}\right )\, dx\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.42, size = 135, normalized size = 0.91 \begin {gather*} -\frac {a^{2} {\rm Ei}\left (\frac {2 \, {\left (d f x + c f\right )}}{d}\right ) e^{\left (2 \, e - \frac {2 \, c f}{d}\right )} - 4 i \, a^{2} {\rm Ei}\left (\frac {d f x + c f}{d}\right ) e^{\left (e - \frac {c f}{d}\right )} + 4 i \, a^{2} {\rm Ei}\left (-\frac {d f x + c f}{d}\right ) e^{\left (-e + \frac {c f}{d}\right )} + a^{2} {\rm Ei}\left (-\frac {2 \, {\left (d f x + c f\right )}}{d}\right ) e^{\left (-2 \, e + \frac {2 \, c f}{d}\right )} - 6 \, a^{2} \log \left (d x + c\right )}{4 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {{\left (a+a\,\mathrm {sinh}\left (e+f\,x\right )\,1{}\mathrm {i}\right )}^2}{c+d\,x} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________